// 基础信息
export const MeansBaseCloums = [
  { label: '客户名称', prop: 'name', width: '200', type: 'input', required: true , disabled: false},
  { label: '客户编码', prop: 'number', width: '100', type: 'input', required: true , disabled: true},
  { label: '客户地址', prop: 'address_code',type: 'address', disabled: false},
  { label: '联系人', prop: 'contact', width: '120', type: 'input', required: true, disabled: false},
  { label: '联系电话', prop: 'tel', type: 'input', required: true, disabled: false,},
  { label: '联系地址', prop: 'contact_address',type: 'input', disabled: false},
]
// 发票信息
export const invoiceInfoCloums = [
  { label: '发票抬头', prop: 'invoice_title', width: '200', type: 'input', required: true , disabled: false},
  { label: '纳税登记号', prop: 'tax_register_code', width: '100', type: 'input', required: true , disabled: true},
  { label: '开户银行', prop: 'invoice_bank_name',type: 'input', disabled: false},
  { label: '银行账号', prop: 'invoice_bank_account', width: '120', type: 'input', required: true, disabled: false},
  { label: '开票联系电话', prop: 'invoice_tel', type: 'input', required: true, disabled: false,},
  { label: '开票通讯地址', prop: 'invoice_address',type: 'input', required: true, disabled: false},
  { label: '统一社会信用代码', prop: 'socialcre_code',type: 'input', required: true, disabled: false},
  { label: '默认发票信息', prop: 'is_default_invoice',type: 'radio', required: true, disabled: false},
]
// 银行信息
export const bankInfoCloums = [
  { label: '开户国家', prop: 'country', width: '200', type: 'select', required: true , disabled: false},
  { label: '账户名称', prop: 'account_name', width: '100', type: 'input', required: true , disabled: true},
  { label: '银行账号', prop: 'invoice_bank_account',type: 'input', disabled: false},
  { label: '默认银行信息', prop: 'is_default_bank', width: '120', type: 'radio', required: true, disabled: false},
]
// 收货地址信息
export const addressInfoCloums = [
  { label: '收货联系人', prop: 'shipping_contact', width: '200', type: 'input', required: true , disabled: false},
  { label: '联系电话', prop: 'shipping_tel', width: '100', type: 'input', required: true , disabled: true},
  { label: '收货地址', prop: 'shipping_address',type: 'address', disabled: false},
  { label: '详细地址', prop: 'address', width: '120', type: 'input', required: true, disabled: false},
  { label: '默认收货地址', prop: 'is_default_consignee', width: '120', type: 'radio', required: true, disabled: false},
  { label: '默认开票地址', prop: 'is_default_invoicing', width: '120', type: 'radio', required: true, disabled: false},
  { label: '默认开票地址', prop: 'is_default_payment', width: '120', type: 'radio', required: true, disabled: false},
]

import { getList } from "~/src/api/area"
// 地区
export const areaOptions = async()=>{
  const res = await getList()
  return res.data.list
}

// 状态对应名称
export const statusLabel = (status: string | number)=>{

  const _status = Number(status)

  let str = '审核中'

  switch (_status) {
    case -1:
      str = '创建中'
      break;
    case 0:
      str = '暂存'
      break;
    case 1:
      str = '待审核'
      break;
    case 2:
      str = '已审核'
      break;
    case 3:
      str = '待完善'
      break;
    case 4:
      str = '已更新'
      break;
    default:
      break;
  }

  return str
}
